FROM mcr.microsoft.com/devcontainers/base:alpine-3.19


### 以下为基础镜像的构建命令，请不要改动

# 设置工作目录
WORKDIR /workspaces/project

# # 环境变量设置
# ENV DEBIAN_FRONTEND=noninteractive
# ENV TZ Asia/Shanghai
# ENV LESSCHARSET=utf-8

# 安装基本工具
RUN apk add gdb

# # 创建用户，容器启动挂载文件时id为1000
# ENV USERNAME=superide
# ARG USER_UID=1000
# ARG USER_GID=1000
# RUN groupadd -g $USER_GID $USERNAME \
#     && useradd -rm -d /home/$USERNAME -s /bin/bash -u $USER_UID -g $USER_GID $USERNAME \
#     && chmod g+rw /home 

# 复制示例项目并更改权限
COPY ../. /workspaces/exampleProject
RUN rm -rf /workspaces/exampleProject/.devcontainer /workspaces/exampleProject/.git
# RUN chown -R superide /workspaces 

### 以下为制作容器镜像时需要修改的区域

# # 安装基本工具
# RUN apk add packageName


# # 切换到普通用户
# USER superide
